//  获取所有分类
import request from './request'

export const getAllCategories = () => {
  return request({
    url: '/api/tabs',
    method: 'get'
  }).then(res => {
    // res.list.shift()
    // return res.list
    const list = res.list.slice(1)
    return list
  })
}

// 根据一级分类id查询分类下的子分类
export const getSubCateogries = id => request({
  url: '/api/tab/' + id,
  method: 'get'
}).then(res => res.categories)
